.class public Llt/noframe/gpsfarmguide/states/map_states/FreeMapState;
.super Ljava/lang/Object;
.source "FreeMapState.java"

# interfaces
.implements Llt/noframe/gpsfarmguide/states/map_states/MapState;


# instance fields
.field private data:Llt/noframe/gpsfarmguide/Data;


# direct methods
.method public constructor <init>()V
    .locals 7

    .line 24
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 25
    invoke-static {}, Llt/noframe/gpsfarmguide/Data;->getInstance()Llt/noframe/gpsfarmguide/Data;

    move-result-object v0

    iput-object v0, p0, Llt/noframe/gpsfarmguide/states/map_states/FreeMapState;->data:Llt/noframe/gpsfarmguide/Data;

    .line 26
    iget-object v0, p0, Llt/noframe/gpsfarmguide/states/map_states/FreeMapState;->data:Llt/noframe/gpsfarmguide/Data;

    invoke-virtual {v0}, Llt/noframe/gpsfarmguide/Data;->getMapStatesController()Llt/noframe/gpsfarmguide/states/map_states/MapStatesController;

    move-result-object v0

    invoke-virtual {v0}, Llt/noframe/gpsfarmguide/states/map_states/MapStatesController;->getButton1()Landroid/view/MenuItem;

    move-result-object v0

    const v1, 0x7f0800b2

    invoke-interface {v0, v1}, Landroid/view/MenuItem;->setIcon(I)Landroid/view/MenuItem;

    .line 27
    iget-object v0, p0, Llt/noframe/gpsfarmguide/states/map_states/FreeMapState;->data:Llt/noframe/gpsfarmguide/Data;

    invoke-virtual {v0}, Llt/noframe/gpsfarmguide/Data;->getMapStatesController()Llt/noframe/gpsfarmguide/states/map_states/MapStatesController;

    move-result-object v0

    invoke-virtual {v0}, Llt/noframe/gpsfarmguide/states/map_states/MapStatesController;->getButton2()Landroid/view/MenuItem;

    move-result-object v0

    const v1, 0x7f08005f

    invoke-interface {v0, v1}, Landroid/view/MenuItem;->setIcon(I)Landroid/view/MenuItem;

    .line 29
    iget-object v0, p0, Llt/noframe/gpsfarmguide/states/map_states/FreeMapState;->data:Llt/noframe/gpsfarmguide/Data;

    invoke-virtual {v0}, Llt/noframe/gpsfarmguide/Data;->getMapStatesController()Llt/noframe/gpsfarmguide/states/map_states/MapStatesController;

    move-result-object v0

    invoke-virtual {v0}, Llt/noframe/gpsfarmguide/states/map_states/MapStatesController;->getButton1()Landroid/view/MenuItem;

    move-result-object v0

    const/4 v1, 0x0

    invoke-interface {v0, v1}, Landroid/view/MenuItem;->setVisible(Z)Landroid/view/MenuItem;

    .line 30
    iget-object v0, p0, Llt/noframe/gpsfarmguide/states/map_states/FreeMapState;->data:Llt/noframe/gpsfarmguide/Data;

    invoke-virtual {v0}, Llt/noframe/gpsfarmguide/Data;->getMapStatesController()Llt/noframe/gpsfarmguide/states/map_states/MapStatesController;

    move-result-object v0

    invoke-virtual {v0}, Llt/noframe/gpsfarmguide/states/map_states/MapStatesController;->getButton2()Landroid/view/MenuItem;

    move-result-object v0

    const/4 v2, 0x1

    invoke-interface {v0, v2}, Landroid/view/MenuItem;->setVisible(Z)Landroid/view/MenuItem;

    .line 31
    iget-object v0, p0, Llt/noframe/gpsfarmguide/states/map_states/FreeMapState;->data:Llt/noframe/gpsfarmguide/Data;

    invoke-virtual {v0}, Llt/noframe/gpsfarmguide/Data;->getMapStatesController()Llt/noframe/gpsfarmguide/states/map_states/MapStatesController;

    move-result-object v0

    invoke-virtual {v0}, Llt/noframe/gpsfarmguide/states/map_states/MapStatesController;->getButton3()Landroid/view/MenuItem;

    move-result-object v0

    invoke-interface {v0, v1}, Landroid/view/MenuItem;->setVisible(Z)Landroid/view/MenuItem;

    .line 32
    iget-object v0, p0, Llt/noframe/gpsfarmguide/states/map_states/FreeMapState;->data:Llt/noframe/gpsfarmguide/Data;

    invoke-virtual {v0}, Llt/noframe/gpsfarmguide/Data;->getMapStatesController()Llt/noframe/gpsfarmguide/states/map_states/MapStatesController;

    move-result-object v0

    invoke-virtual {v0}, Llt/noframe/gpsfarmguide/states/map_states/MapStatesController;->getLayersButton()Landroid/view/MenuItem;

    move-result-object v0

    invoke-interface {v0, v2}, Landroid/view/MenuItem;->setVisible(Z)Landroid/view/MenuItem;

    .line 33
    iget-object v0, p0, Llt/noframe/gpsfarmguide/states/map_states/FreeMapState;->data:Llt/noframe/gpsfarmguide/Data;

    invoke-virtual {v0}, Llt/noframe/gpsfarmguide/Data;->getMapStatesController()Llt/noframe/gpsfarmguide/states/map_states/MapStatesController;

    move-result-object v0

    invoke-virtual {v0}, Llt/noframe/gpsfarmguide/states/map_states/MapStatesController;->getZoomOutButton()Landroid/widget/ImageButton;

    move-result-object v0

    invoke-virtual {v0, v1}, Landroid/widget/ImageButton;->setVisibility(I)V

    .line 34
    iget-object v0, p0, Llt/noframe/gpsfarmguide/states/map_states/FreeMapState;->data:Llt/noframe/gpsfarmguide/Data;

    invoke-virtual {v0}, Llt/noframe/gpsfarmguide/Data;->getMapStatesController()Llt/noframe/gpsfarmguide/states/map_states/MapStatesController;

    move-result-object v0

    invoke-virtual {v0}, Llt/noframe/gpsfarmguide/states/map_states/MapStatesController;->getCenter()Landroid/widget/ImageButton;

    move-result-object v0

    invoke-virtual {v0, v1}, Landroid/widget/ImageButton;->setVisibility(I)V

    .line 35
    iget-object v0, p0, Llt/noframe/gpsfarmguide/states/map_states/FreeMapState;->data:Llt/noframe/gpsfarmguide/Data;

    const/4 v3, 0x0

    invoke-virtual {v0, v3}, Llt/noframe/gpsfarmguide/Data;->setSelectedMarker(Lcom/google/android/gms/maps/model/Marker;)V

    .line 36
    iget-object v0, p0, Llt/noframe/gpsfarmguide/states/map_states/FreeMapState;->data:Llt/noframe/gpsfarmguide/Data;

    invoke-virtual {v0}, Llt/noframe/gpsfarmguide/Data;->getCurrent_measuring()Llt/noframe/gpsfarmguide/models/MeasuringModel;

    move-result-object v0

    if-eqz v0, :cond_0

    .line 37
    iget-object v0, p0, Llt/noframe/gpsfarmguide/states/map_states/FreeMapState;->data:Llt/noframe/gpsfarmguide/Data;

    invoke-virtual {v0}, Llt/noframe/gpsfarmguide/Data;->getCurrent_measuring()Llt/noframe/gpsfarmguide/models/MeasuringModel;

    move-result-object v0

    invoke-virtual {v0}, Llt/noframe/gpsfarmguide/models/AbstractMeasuringModel;->unmarkMeasure()V

    .line 38
    :cond_0
    iget-object v0, p0, Llt/noframe/gpsfarmguide/states/map_states/FreeMapState;->data:Llt/noframe/gpsfarmguide/Data;

    invoke-virtual {v0, v3}, Llt/noframe/gpsfarmguide/Data;->setCurrent_measuring(Llt/noframe/gpsfarmguide/models/MeasuringModel;)V

    .line 40
    iget-object v0, p0, Llt/noframe/gpsfarmguide/states/map_states/FreeMapState;->data:Llt/noframe/gpsfarmguide/Data;

    invoke-static {}, Llt/noframe/gpsfarmguide/App;->getContext()Landroid/content/Context;

    move-result-object v3

    invoke-virtual {v0, v3}, Llt/noframe/gpsfarmguide/Data;->getToolbarheight(Landroid/content/Context;)I

    move-result v0

    .line 42
    iget-object v3, p0, Llt/noframe/gpsfarmguide/states/map_states/FreeMapState;->data:Llt/noframe/gpsfarmguide/Data;

    invoke-virtual {v3}, Llt/noframe/gpsfarmguide/Data;->getMap()Lcom/google/android/gms/maps/GoogleMap;

    move-result-object v3

    if-eqz v3, :cond_1

    .line 43
    iget-object v3, p0, Llt/noframe/gpsfarmguide/states/map_states/FreeMapState;->data:Llt/noframe/gpsfarmguide/Data;

    invoke-virtual {v3}, Llt/noframe/gpsfarmguide/Data;->getMap()Lcom/google/android/gms/maps/GoogleMap;

    move-result-object v3

    invoke-virtual {v3, v1, v0, v1, v1}, Lcom/google/android/gms/maps/GoogleMap;->setPadding(IIII)V

    .line 45
    :cond_1
    invoke-static {}, Llt/noframe/gpsfarmguide/App;->getContext()Landroid/content/Context;

    move-result-object v0

    iget-object v3, p0, Llt/noframe/gpsfarmguide/states/map_states/FreeMapState;->data:Llt/noframe/gpsfarmguide/Data;

    invoke-virtual {v3}, Llt/noframe/gpsfarmguide/Data;->getMapStatesController()Llt/noframe/gpsfarmguide/states/map_states/MapStatesController;

    move-result-object v3

    invoke-virtual {v3}, Llt/noframe/gpsfarmguide/states/map_states/MapStatesController;->getZoomOutButton()Landroid/widget/ImageButton;

    move-result-object v3

    const-wide/high16 v4, 0x404e000000000000L    # 60.0

    invoke-static {}, Llt/noframe/gpsfarmguide/App;->getContext()Landroid/content/Context;

    move-result-object v6

    invoke-static {v4, v5, v6}, Llt/noframe/gpsfarmguide/utils/ScreenHelper;->dpToPx(DLandroid/content/Context;)I

    move-result v4

    invoke-static {v0, v3, v4, v2}, Llt/noframe/gpsfarmguide/utils/ScreenHelper;->setTopMargins(Landroid/content/Context;Landroid/widget/ImageButton;IZ)V

    .line 46
    invoke-static {}, Llt/noframe/gpsfarmguide/App;->getContext()Landroid/content/Context;

    move-result-object v0

    iget-object v3, p0, Llt/noframe/gpsfarmguide/states/map_states/FreeMapState;->data:Llt/noframe/gpsfarmguide/Data;

    invoke-virtual {v3}, Llt/noframe/gpsfarmguide/Data;->getMapStatesController()Llt/noframe/gpsfarmguide/states/map_states/MapStatesController;

    move-result-object v3

    invoke-virtual {v3}, Llt/noframe/gpsfarmguide/states/map_states/MapStatesController;->getCenter()Landroid/widget/ImageButton;

    move-result-object v3

    const-wide/high16 v4, 0x4024000000000000L    # 10.0

    invoke-static {}, Llt/noframe/gpsfarmguide/App;->getContext()Landroid/content/Context;

    move-result-object v6

    invoke-static {v4, v5, v6}, Llt/noframe/gpsfarmguide/utils/ScreenHelper;->dpToPx(DLandroid/content/Context;)I

    move-result v4

    invoke-static {v0, v3, v4, v2}, Llt/noframe/gpsfarmguide/utils/ScreenHelper;->setTopMargins(Landroid/content/Context;Landroid/widget/ImageButton;IZ)V

    .line 47
    invoke-static {}, Llt/noframe/gpsfarmguide/App;->getContext()Landroid/content/Context;

    move-result-object v0

    check-cast v0, Llt/noframe/gpsfarmguide/views/ActivityDrawer;

    invoke-virtual {v0, v1}, Llt/noframe/gpsfarmguide/views/ActivityDrawer;->setDrawerLocked(Z)V

    return-void
.end method


# virtual methods
.method public button1()V
    .locals 2

    .line 52
    invoke-static {}, Llt/noframe/gpsfarmguide/App;->getContext()Landroid/content/Context;

    move-result-object v0

    const/4 v1, 0x1

    invoke-static {v0, v1}, Llt/noframe/gpsfarmguide/dialogs/ModeSelectDialog;->show(Landroid/content/Context;I)V

    return-void
.end method

.method public button2()V
    .locals 2

    .line 57
    invoke-static {}, Llt/noframe/gpsfarmguide/App;->getContext()Landroid/content/Context;

    move-result-object v0

    const/4 v1, 0x2

    invoke-static {v0, v1}, Llt/noframe/gpsfarmguide/dialogs/ModeSelectDialog;->show(Landroid/content/Context;I)V

    return-void
.end method

.method public button3()V
    .locals 0

    return-void
.end method

.method public buttonCenter()V
    .locals 2

    .line 75
    invoke-static {}, Llt/noframe/gpsfarmguide/App;->getContext()Landroid/content/Context;

    move-result-object v0

    const/4 v1, 0x1

    invoke-static {v0, v1, v1, v1}, Llt/noframe/gpsfarmguide/LocationTracking;->centerMyPosition(Landroid/content/Context;ZZZ)Z

    return-void
.end method

.method public buttonZoom()V
    .locals 3

    .line 67
    iget-object v0, p0, Llt/noframe/gpsfarmguide/states/map_states/FreeMapState;->data:Llt/noframe/gpsfarmguide/Data;

    invoke-virtual {v0}, Llt/noframe/gpsfarmguide/Data;->getAreas()Ljava/util/List;

    move-result-object v0

    invoke-interface {v0}, Ljava/util/List;->size()I

    move-result v0

    if-gtz v0, :cond_1

    iget-object v0, p0, Llt/noframe/gpsfarmguide/states/map_states/FreeMapState;->data:Llt/noframe/gpsfarmguide/Data;

    invoke-virtual {v0}, Llt/noframe/gpsfarmguide/Data;->getDistances()Ljava/util/List;

    move-result-object v0

    invoke-interface {v0}, Ljava/util/List;->size()I

    move-result v0

    if-lez v0, :cond_0

    goto :goto_0

    .line 70
    :cond_0
    invoke-static {}, Llt/noframe/gpsfarmguide/App;->getContext()Landroid/content/Context;

    move-result-object v0

    invoke-static {}, Llt/noframe/gpsfarmguide/App;->getContext()Landroid/content/Context;

    move-result-object v1

    const v2, 0x7f11015a

    invoke-virtual {v1, v2}, Landroid/content/Context;->getString(I)Ljava/lang/String;

    move-result-object v1

    invoke-static {v0, v1}, Llt/noframe/gpsfarmguide/widgets/MegaToast;->showTextLong(Landroid/content/Context;Ljava/lang/String;)Llt/noframe/gpsfarmguide/widgets/MegaToast;

    goto :goto_1

    :cond_1
    :goto_0
    const/4 v0, 0x2

    .line 68
    invoke-static {v0}, Llt/noframe/gpsfarmguide/utils/Camera;->zoomToMeasures(I)V

    :goto_1
    return-void
.end method

.method public onBackPressed()V
    .locals 0

    return-void
.end method
